

            +---------------------------------+
            |   ZeS version 0.4 source code   |
            |                                 |
            |         by Jean CAROT           |
            +---------------------------------+



  I decided to release ZeS source code because version 0.4 is the
  last release (well, I think) and that I wanted to share some infos
  with the TI-community. This file is here to explain you how ZeS
  works. The zip file contains:

           Install.asm
           shell.asm
           ZeS.asm



  >> INSTALL.ASM

  This is simply the BASIC program that launchs ZES.83p, the installer.
  It looks like this:

  :Send(9prgmZES

  The install program deletes it.



  >> SHELL.ASM

  The actual 'shell', that is installed at $9327 and that finds the
  name of the program being run, that loads it, that swaps bytes,
  that clears screen etc.

  If you look at this file, you'll see at the begining:
  #define	prgmName	$913B

  This area of memory (9 bytes) is where the TI stores the name of
  the program that is being run. that's how it looks:


  913B  06 46 54 55 4E 00 00 00  .FTUN...
  9143  00                       .

  The first byte ($06) stands for protected prog (var type).

  The shell only copy these 9 bytes into op1 (rst 20h) and calls
  _findsym to get program data. Simple. Then it swaps bytes,
  calls $9327, swaps bytes back, clears screens, and quit.



  >> ZES.ASM

  This is the install program before installation and the link
  between ASM and BASIC after installation...

  Installation:
    -check if another shell has been installed (byte at $9327 different
     of $00) and cancels if error
    -delete INSTALL.83p
    -resize ZES.83p to 17 bytes (End:0000:End)
    -delete ZES.83p data just leave (End:0000:End)
    -change usermemoffset value to leave the shell at $9327 that was
     stored after installer
    -display "ZeS v0.4 installed"
    -Thats it.

  The reason why ZES.83p is the link between ASM and BASIC is because
  it looks like:

  :End
  :0000
  :End

  and all ZeS programs start with the same header:

  :Send(9prgmZES
  :Return
  :[assembly squished data]

  So when they execute ZES with the Send(9 command, its the equivalent
  of the assembly command:

  jp	$9327	(from a BASIC program!)


  Thats the how ZeS works, trying to created a link between BASIC & ASM.




  - ZeS version 0.4 coded by Jean CAROT
